/*
 * RigidBody.h
 *
 *  Created on: 10/01/2011
 *      Author: Nenem
 */

#ifndef RIGIDBODY_H_
#define RIGIDBODY_H_

#include "Body.h"

class RigidBody : public Body{
private:
//	//Position of collision Area;
//	Point2D pC;
//	//Wide of collision Area;
//	int wC;
//	//Height of collision Area;
//	int hC;
	Information east;
	Information north;
	Information south;
	Information west;

	Position* pos;
	Direction *direction;
public:
	RigidBody();
	RigidBody(Position *position);

	virtual ~RigidBody();

	Rectangle collideAreaMovement(Point2D oldP, Point2D newP, Direction *direction);

	Rectangle collideArea(Point2D pos, Direction *direction);

	Point2D distance(Point2D P, Direction *direction, RigidBody *rb, Point2D rbPoint, Direction *rbDir);

	Point2D distance(Point2D P, Direction *direction, Rectangle otherArea);

	bool isRigid(){
		return true;
	}

	void update() {}

	int getX1(Point2D point, Direction *direction);
	int getX2(Point2D point, Direction *direction);
	int getY1(Point2D point, Direction *direction);
	int getY2(Point2D point, Direction *direction);

    Position *getPos() const
    {
        return pos;
    }

    void setPos(Position *pos)
    {
        this->pos = pos;
    }

    Direction *getDirection() const
    {
        return direction;
    }

    void setDirection(Direction *direction)
    {
        this->direction = direction;
    }

    Information getEast() const
    {
        return east;
    }

    Information getNorth() const
    {
        return north;
    }

    Information getSouth() const
    {
        return south;
    }

    Information getWest() const
    {
        return west;
    }

    void setEast(Information east)
    {
        this->east = east;
    }

    void setNorth(Information north)
    {
        this->north = north;
    }

    void setSouth(Information south)
    {
        this->south = south;
    }

    void setWest(Information west)
    {
        this->west = west;
    }

};

#endif /* RIGIDBODY_H_ */
